package com.zzyl.mapper;

import com.zzyl.entity.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MemberMapper {
    /**
     * 根据openId查询用户信息
     * @param openId
     */
    Member selectByOpenId(String openId);

    /**
     * 更新用户信息
     * @param updateMember
     */
    void update(Member updateMember);

    /**
     * 新增用户
     * @param member
     */
    void insert(Member member);

    /**
     * 根据用户id查询用户信息
     * @param userId
     * @return
     */
    @Select("select * from zzyl.member where id = #{userId}")
    Member selectMemberById(Long userId);
}
